/**
 * 图片模块封装api接口
 */
import request from '@/utils/request'

// 上传图片：生成访问路径
export const uploadImageService = (formData) => {
  return request.post('/api/image/upload-image', formData)
}

// 保存图片
export const saveImageService = (imgUrl) => {
  return request.post('/api/image/save-image', { imgUrl })
}

// 获取图片列表
export const getImageListService = () => {
  return request.get('/api/image/get-image-list')
}

// 删除图片
export const deleteImageService = (id) => {
  return request.post('/api/image/delete-image', { id })
}

// 恢复图片
export const restoreImageService = (id) => {
  return request.post('/api/image/restore-image', { id })
}

// 永久删除图片
export const permanentlyDeleteImageService = (id) => {
  return request.post('/api/image/permanently-delete-image', { id })
}